#include <iostream>
#include <string>
#include "poll_server.hpp"
#include <memory>
using namespace std;


int main(int argc, char* args[]) {
    if (argc != 2) {
        cout << "Usage:\n\t" << args[0] << " local_port\n" << endl;
        return 0;
    }
    uint16_t port = stoi(args[1]);

    unique_ptr<PollServer> psvr = unique_ptr<PollServer>(new PollServer(port));
    psvr->Init();
    psvr->Loop();
    return 0;
}